#include "player.h"


player::player()
	:	_name(DEF_NAME),
		_shoot(ATT_MIN),
		_pass(ATT_MIN),
		_drible(ATT_MIN),
		_defense(ATT_MIN)
{
	// Nothing to do.
}

player::~player()
{
	// Nothing here too.
}


void player::shoot(const int s)
{
	this->_shoot = ( ( (s >= ATT_MIN) && (s <= ATT_MAX) ) ? s : ATT_MIN);
}

void player::pass(const int p)
{
	this->_pass = ( ( (p >= ATT_MIN) && (p <= ATT_MAX) ) ? p : ATT_MIN);
}

void player::drible(const int d)
{
	this->_drible = ( ( (d >= ATT_MIN) && (d <= ATT_MAX) ) ? d : ATT_MIN);
}

void player::defense(const int d)
{
	this->_defense = ( ( (d >= ATT_MIN) && (d <= ATT_MAX) ) ? d : ATT_MIN);
}


string	player::name()		const {return this->_name	;}
int		player::shoot()		const {return this->_shoot	;}
int		player::pass()		const {return this->_pass	;}
int 	player::drible()	const {return this->_drible	;}
int 	player::defense()	const {return this->_defense;}

